2 March 2017

TOC

Overview

What does the Kalman filter do?

Kalman filtering, also known as linear quadratic estimation (LQE), is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by using Bayesian inference and estimating a joint probability distribution over the variables for each timeframe. The filter is named after Rudolf E. Kálmán, one of the primary developers of its theory.

Source: WIKIPEDIA

See it in action

Basic concept

Kalman process chart

Variable Functions

  • Original error estimate
  • Error in estimate
  • Calculate Kalman gain
  • Calculate current estimate
  • Previous estimate
  • Error in data (measurement)
  • Calculate new error in estimate
  • Updates estimate

Original estimate

  • Original estimate
  • Original error in estimate
original.estimate <- 4
original.error    <- 2

Error in estimate

current.estimate <- original.estimate
current.error    <- original.error

Kalman gain

\(\text{kalman gain} = KG = \frac{E_{EST}}{E_{EST} + E_{MEA}}\)

kalman.gain = current.error / ( current.error + measured.error )

Update estimate

\(\text{measurement} = MEA\)

previous.estimate <- current.estimate
  • \(\text{current estimate} = EST_t\)
  • \(\text{previous estimate} = EST_{t-1}\)

\[EST_t = EST_{t-1} + KG [MEA - EST_{t-1} ]\]

current.estimate = previous.estimate + kalman.gain * (measurement - previous.estimate)

Update error in estimate

\[E_{EST_t} = \frac{E_{MEA}E_{EST_{t-1}}}{E_{MEA}+E_{EST_{t-1}}} \Rightarrow [1-KG] E_{EST_{t-1}}\]

current.error = ( measured.error * previous.error ) / 
                ( measured.error + previous.error )
current.error = (1 - kalman.gain) * previous.error

Example

Used resource

END